home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / winsock / ircii2-6.zip / SRC\IRCII-2.6\SCRIPT\REPEAT < prev    next >
Text File  |  1994-12-28  |  298b  |  21 lines

  1. # Use a simply while loop to repeat a command.
  2. alias repeat {
  3.     @ rep.cnt = [$0]
  4.     while ( rep.cnt > 0 )
  5.     {
  6.         $1-
  7.         @rep.cnt = rep.cnt - 1
  8.     }
  9.     ^assign -rep.cnt
  10. }
  11.  
  12. # Do the samn thing with recursion  See.. SET MAX_RECURSIONS
  13. alias recrepeat {
  14.     if ([$0] > 0)
  15.     {
  16.         $1-
  17.         recrepeat ${[$0] -1} $1-
  18.     }
  19. }
  20.     
  21.